local Maomao = fk.CreateSkill {
    name = "Maomao",
    anim_type = "drawcard",
    attached_skill_name = "MaomaoOther&",
}

Fk:loadTranslationTable{
  ["Maomao"] = "猫猫",
  [":Maomao"] = "其他角色的出牌阶段，其可以交给你一张牌，然后下一张使用的牌改为你使用，你以此法获得的牌不计入手牌上限。",
  ["#Maomao-give"] = "猫猫：你可以交给 %src 一张牌，然后你下一张使用的牌改为 %src 使用",
  ["#Maomao_choice"] = "猫猫：选择一名其他角色，交给其一张牌",
  ["#Maomao_used"] = "%from 将 %card 交给了 %to，%to 将会使用 %from 的下一张牌",
}

-- 其他角色出牌阶段可触发猫猫
Maomao:addEffect(fk.PreCardUse, {
  is_delay_effect = true,
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(Maomao.name) and player:getMark("@@Maomao") == 1 and data.from ~= player
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:setPlayerMark(player, "@@Maomao", 0)
    data.from = player

  end
})

Maomao:addEffect("maxcards", {
  exclude_from = function(self, player, card)
    return player:hasSkill(Maomao.name) and card:getMark("@@Maomao-inhand") > 0
  end,
})

return Maomao 